#ifndef PICTUREBUS_H
#define PICTUREBUS_H
#include <vector>
#include "Cartridge.h"
#include "Mapper.h"

PNE_NAMESPACE_BEGIN
struct PictureBus
{
    PictureBus();
    Byte Read(Address addr);
    void Write(Address addr, Byte value);
    bool SetMapper(Mapper *mapper);
    Byte ReadPalette(Byte paletteAddr);
    void UpdateMirroring();
    void ScanlineIRQ();

private:
    std::size_t NameTable0, NameTable1, NameTable2, NameTable3; // indices where they start in RAM vector
    std::vector<Byte> m_palatte;
    std::vector<Byte> m_RAM;
    Mapper *m_mapper;
};

PNE_NAMESPACE_END

#endif // PICTUREBUS_H

// DONE